﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

namespace EmployeeCheckIn
{
    public class Selectdata 
    {
            public DataTable SelectAll(string i)
            {
             string sqltext = "select * from employee where emp_code = '"+i+"' ";
                SqlConnection sqlconn = new SqlConnection("Server=202.44.52.248;Database=DB_Personal;User Id=personal;Password=1234;");
                SqlDataAdapter da = new SqlDataAdapter(sqltext, sqlconn);
                DataSet ds = new DataSet();
                da.Fill(ds);

                return ds.Tables[0];
            }
            public DataTable SelectAdminData(int i)
            {
                string sqltext = @"select * from tbl_log_in where admin_id="+i+"  ";                               
                                     
                                      
                SqlConnection sqlconn = new SqlConnection("Server=202.44.52.248;Database=DB_Personal;User Id=personal;Password=1234;");
                SqlDataAdapter da = new SqlDataAdapter(sqltext, sqlconn);
                DataSet ds = new DataSet();
                da.Fill(ds);

                return ds.Tables[0];
            }
           
    }
}